﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HR.Appointments.Service.DataAccessLayer
{
    /// <summary>
    /// Gets the open hours from the database
    /// </summary>
    public interface IOpenHoursDAO
    {
        /// <summary>
        /// Updates the entity to the database.
        /// </summary>
        /// <param name="openhour"></param>
        void Commit(OpenHoursEntity openhour);

        /// <summary>
        /// Gets the open hours for a company by date
        /// </summary>
        /// <param name="companyId">Company identifier</param>
        /// <param name="date">The date which we what to check</param>
        /// <returns>A loaded entity</returns>
        OpenHoursEntity GetByDate(int companyId, DateTime date);

        /// <summary>
        /// Get all open hours for a specific company
        /// </summary>
        /// <param name="companyId"></param>
        /// <returns>A list of loaded entities</returns>
        List<OpenHoursEntity> GetByCompany(int companyId);
    }
}
